package org.example.innerClass;

import java.util.concurrent.atomic.AtomicLong;

public class Demo {


    public void doSomething() {
        String name;
        Long nameaa;
        Person person = new Person();
        AtomicLong aa =new AtomicLong();

        MyInterface myInterface = new MyInterface() {
            @Override
            public void method() {
//                name ="aa";
//                nameaa =1l;
                person.setAa("aa");
                aa.getAndSet(111);
                System.out.println("实现接口的方法");
            }
        };

        myInterface.method();


        new Thread(new Runnable() {
            @Override
            public void run() {
//                name="aaa";
//                nameaa =1l;
                System.out.println("aaaa");
            }
        }).start();
    }

    interface MyInterface {
        void method();
    }




}
